<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns:wb="http://open.weibo.com/wb">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<head>
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="http://qzonestyle.gtimg.cn/qzone/openapi/qc_loader.js" data-appid="100482735" data-redirecturi="http://befamousstore.com/" charset="utf-8" data-callback="true"></script>
      <link rel="stylesheet" type="text/css" href="/css/style_member.css" />
      <%@include file="artOne/common/mjs.jsp"%>
    <link rel="stylesheet" type="text/css" href="/css/reset.css" />
    <title>会员注册-笔飞美术作品</title>
    <script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js?appkey=1798848182" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div id="box">
    <%@include file="artOne/common/header.jsp" %>
    <div id="main_div">
        <div class="site_map"><a href="/welcome.htm">首页</a> 》会员注册</div>
        
        <div id="member_div_1">
            <div class="user_form_wrapper clearfix" id="user_form_wrapper">
                <form method="post" action="loginOn.htm" class="user_form" id="user_login">
                <h2>
                    用户登录</h2>
                <div class="req">
                    <b>*</b> 为必填项</div>
                <label for="username_login">
                    <b><span class="req">*</span>E-mail / 用户名：</b>
                    <input type="text" name="loginName" value="" id="username_login" />
                </label>
                <label for="password_login">
                    <b><span class="req">*</span>密码：</b>
                    <input type="password" name="loginPwd" value="" id="password_login" /><em><a href="get_password">您忘记密码了吗？</a></em>
                </label>
                <fieldset class="checkbox_wrap label" style="border:0;">
                    <b>&nbsp;</b>
                    <fieldset style="border:0;">
                    	<p style="color: black;">${loginError}</p> 
                    	<br/>
                        <label for="remember_login">
                            <input type="checkbox" name="remember" value="1" class="checkbox" id="remember_login" />请保存我这次的登录信息。</label>
                    </fieldset>
                </fieldset>
                <div class="submit_wrap">
                    <input type="submit" value="登录" class="submit btn_special btn_login" />　
                 	  
                    <input type="hidden" name="act" value="act_login" />
                </div>
                <div class="submit_wrap">
                                          合作网站登陆： <a id="wb_connect_btn"> <wb:login-button type="4,4" onlogin="login" onlogout="logout">登录按钮</wb:login-button></a>
                  <div style="padding:10px 0 5px 90px">
                        <a id="qq_login_btn"></a> 
                   </div>
                </div>
                </form>

                <div class="extra">
                    <h2>
                        注册新账号</h2>
                    <p>
                        如果您想登录，需要拥有一个账号。现在就注册一个账号吧。</p>
                    <p>
                        <a href="/register.htm" class="button"><span>立即注册</span></a></p>
                </div>
            </div>

        </div>
       <%@include file="artOne/common/footer.jsp" %>
    </div>
    
    
</div>
<script type="text/javascript">
validRegister();
$('#show_register_extra').click(function(){
	$(this).parent().hide();
	$('#register_extra_field').show();
	return false;
});
WB2.anyWhere(function(W){
    W.widget.connectButton({
        id: "wb_connect_btn",	
        type:"4,4",
        callback : {
            login:function(o){	//登录后的回调函数
				 // alert("1: "+o.screen_name) 
            	// alert("1: "+o.bmiddle_pic) 
            	 //alert("1: "+o.id) 
            	$.post("/sinalogin.htm", {
         			sinaName:o.screen_name,
         			sinaId:o.id
         		}, function(data){
         			     //alert(data);
         			if(data=='true'){
						window.location.href="/outRegister.htm";
					 }else if(data=='false'){
						 window.location.href="/member.htm";
					}
				});
            },	
            logout:function(){	//退出后的回调函数
            	window.location.href="/welcome.htm"
            }
        }
    });
});
	 	//调用QC.Login方法，指定btnId参数将按钮绑定在容器节点中 
				QC.Login({ 
				    //btnId：插入按钮的节点id，必选 
				    btnId:"qq_login_btn",   
				    //用户需要确认的scope授权项，可选，默认all 
				    scope:"all", 
				    //按钮尺寸，可用值[A_XL| A_L| A_M| A_S|  B_M| B_S| C_S]，可选，默认B_S 
				    size: "B_S" 
				}, function(reqData, opts){//登录成功 
		    	//根据返回数据，更换按钮显示状态方法 
			    var dom = document.getElementById(opts['btnId']), 
			    _logoutTemplate=[ 
		         //头像 
		         '<span><img src="{figureurl}" class="{size_key}"/></span>', 
		         //昵称 
		         '<span>{nickname}</span>', 
		         //退出 
		         '<span><a href="javascript:QC.Login.signOut();">退出</a></span>'   
		                  ].join(""); 
		    	 dom && (dom.innerHTML = QC.String.format(_logoutTemplate, { 
				        nickname : QC.String.escHTML(reqData.nickname), 
				        figureurl : reqData.figureurl 
		           })); 
		    	 $.post("/qqlogin.htm", {
	         			qqName:QC.String.escHTML(reqData.nickname),
	         			qqfigureurl: reqData.figureurl 
	         		}, function(data){
	         			if(data=='true'){
							window.location.href="/outRegister.htm";
						 } else if(data=='false'){
							 window.location.href="/member.htm";
						} 
					});
		}, function(opts){//注销成功 
				window.location.href="/welcome.htm"
		        } 
		); 
</script> 
</body>
</html>
